Electronic device and method for sharing streaming video

ABSTRACT

A method of creating and sharing a streaming video to other devices by an electronic device, which comprises a first camera and a second camera, is disclosed. A voice signal collected by the electronic device is encoded into digital audio data. The first camera captures first still images and the second camera captures second still images simultaneously. The first still images and/or the second still images are cropped and combined to generate combined images. The combined images are encoded into encoded images with a predetermined format. A streaming video is obtained by mixing the encoded images with the digital audio data and transmitted to other remote devices.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.201710697688.7 filed on Aug. 15, 2017, the contents of which areincorporated by reference herein.

FIELD

The subject matter herein generally relates to managing technology, andparticularly to an electronic device and a method of sharing streamingvideo with other electronic devices.

BACKGROUND

In portable electronic devices, a streaming video captured by a frontcamera and a streaming video captured by a rear camera cannot besimultaneously shared with others in real time. Therefore, there is aroom to improve the field.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the disclosure can be better understood with referenceto the following drawings. The components in the drawings are notnecessarily drawn to scale, the emphasis instead being placed uponclearly illustrating the principles of the disclosure. Moreover, in thedrawings, like reference numerals designate corresponding partsthroughout the several views.

FIG. 1 illustrates a block diagram of one exemplary embodiment of anelectronic device.

FIG. 2 illustrates a block diagram of one exemplary embodiment ofmodules of an image processing module included in the electronic deviceof FIG. 1.

FIG. 3 illustrates a flow chart of one exemplary embodiment of a methodof transmitting a streaming video.

FIG. 4A illustrates an example of thirty still images captured by afirst camera and thirty still images captured by a second camera.

FIG. 4B illustrates an example of adjusting a width of each of thethirty still images captured by the first camera.

FIG. 4C illustrates an example of combining the still images captured bythe first camera and the still images captured by the second camera.

FIG. 5 illustrates an example of switching positions of the still imagescaptured by the first camera and positions of the still images capturedby the second camera in combined images.

DETAILED DESCRIPTION

It will be appreciated that for simplicity and clarity of illustration,where appropriate, reference numerals have been repeated among thedifferent figures to indicate corresponding or analogous elements. Inaddition, numerous specific details are set forth in order to provide athorough understanding of the embodiments described herein. However, itwill be understood by those of ordinary skill in the art that theembodiments described herein can be practiced without these specificdetails. In other instances, methods, procedures, and components havenot been described in detail so as not to obscure the related relevantfeature being described. Also, the description is not to be consideredas limiting the scope of the embodiments described herein. The drawingsare not necessarily to scale and the proportions of certain parts may beexaggerated to better illustrate details and features of the presentdisclosure.

The present disclosure, referencing the accompanying drawings, isillustrated by way of examples and not by way of limitation. It shouldbe noted that references to “an” or “one” embodiment in this disclosureare not necessarily to the same embodiment, and such references mean “atleast one.”

Furthermore, the term “module”, as used herein, refers to logic embodiedin hardware or firmware, or to a collection of software instructions,written in a programming language, such as Java, C, or assembly. One ormore software instructions in the modules can be embedded in firmware,such as in an EPROM. The modules described herein can be implemented aseither software and/or hardware modules and can be stored in any type ofnon-transitory computer-readable medium or other storage device. Somenon-limiting examples of non-transitory computer-readable media includeCDs, DVDs, BLU-RAY, flash memory, and hard disk drives.

FIG. 1 illustrates a block diagram of one exemplary embodiment of anelectronic device. In the exemplary embodiment, an electronic device 1can include, but is not limited to, a processor 10, a storage device 20,a microphone 30, a first camera 40, a second camera 50, an input device60, a controller 70, and a communication device 80. The above componentsare electrically connected with one another. In at least one exemplaryembodiment, the electronic device 1 can be a mobile phone, a tabletcomputer, or any other suitable device.

The processor 10 can be a central processing unit, a microprocessor, orany other suitable chip having data processing function.

In at least one exemplary embodiment, the storage device 20 can be aninternal storage device built in the electronic device 1. In otherexemplary embodiments, the storage device 20 can be an external storagedevice removably connected to the electronic device 1. For example, thestorage device 20 can be a smart media card, a secure digital card, aflash card.

The microphone 30 can collect a voice signal. The first camera 40 andthe second camera 50 can respectively be a rear camera and a frontcamera of the electronic device 1.

In at least one exemplary embodiment, the first camera 40 and the secondcamera 50 have different pixels. In at least one exemplary embodiment, aquantity of the pixels of the first camera 40 is greater than a quantityof the pixels of the second camera 50.

The input device 60 can receive input by a user. In at least oneexemplary embodiment, the input device 60 can be a touch display thatcan generate touch signals in response to user inputs. In otherexemplary embodiments, the input device 60 can be a key that cangenerate a press signal when the key is pressed.

The controller 70 can generate control signals in response to user inputthrough the input device 60. The communication device 80 can be awireless communication device. For example, the communication device 80can be a WIFI device, or a BLUETOOTH device. The electronic device 1 cantransmit request signals using the communication device 80. For example,the electronic device 1 can send a request signal to a server 2 forrequesting the server 2 to establish a transmitting channel between theelectronic device 1 and a remote device 3. In at least one exemplaryembodiment, the server 2 can be a server for a social media application,e.g. FACEBOOK, installed in the electronic device 1. The remote device 3can be a mobile phone or a computer.

In at least one exemplary embodiment, the processor 10 can include, butis not limited to, an image processing module 110, a video codec 120, anaudio codec 130, and a mixer 140.

In at least one exemplary embodiment, the image processing module 110can control the first camera 40 to capture a plurality of first stillimages and the second camera 50 to capture a plurality of second stillimages, and may crop the first still images and/or the second stillimages. In this embodiment, the image processing module 110 can combinethe first still images, which have been cropped, and the second stillimages, which have been cropped or not been cropped. The imageprocessing module 110 can then transmit the combined images to the videocodec 120.

In at least one exemplary embodiment, the image processing module 110can be a graphics processor integrated inside the processor 10. In otherexemplary embodiments, the image processing module 110 can be a softwaremodule that can be executed by the processor 10. As illustrated in FIG.2, in at least one exemplary embodiment, the image processing module 110can include, but is not limited to, an obtaining module 1101, a croppingmodule 1102, and a combining module 1103. The modules 1101-1103 can besoftware instructions which can be stored in the storage device 20 andexecuted by the processor 10 or the graphics processor. In otherexemplary embodiments, the modules 1101-1103 can be firmware.

The video codec 120 can encode each combined image into an encoded imagewith a predetermined format (e.g., MPEG4 format) such that a pluralityof encoded images with the predetermined format are obtained. The videocodec 120 can transmit each encoded image to the mixer 140.

In at least one exemplary embodiment, the microphone 30 can collect avoice signal and transmit the voice signal to the audio codec 130. Theaudio codec 130 can encode the voice signal into digital audio data andtransmit the digital audio data to the mixer 140.

In at least one exemplary embodiment, the mixer 140 can mix each encodedimage with the digital audio data to generate a streaming video. In atleast one exemplary embodiment, the mixer 140 can, in response to userinput, mix each encoded image with the digital audio data to generatethe streaming video. The streaming video can be stored in the storagedevice 20. The mixer 140 can further transmit the streaming video to thecommunication device 80. The communication device 80 can transmit thestreaming video to the remote device 3 through the transmitting channelestablished by the server 2 between the electronic device 1 and theremote device 3, such that the electronic device 1 can share thestreaming video with the remote device 3.

FIG. 3 illustrates a flowchart presented in accordance with an exampleembodiment. The exemplary method 300 is provided by way of example, asthere are a variety of ways to carry out the method. The method 300described below can be carried out using the configurations illustratedin FIG. 1, for example, and various elements of these figures arereferenced in explaining exemplary method 300. Each block shown in FIG.3 represents one or more processes, methods, or subroutines, carried outin the exemplary method 300. Additionally, the illustrated order ofblocks is by example only and the order of the blocks can be changed.The exemplary method 300 can begin at block 301. Depending on theembodiment, additional steps can be added, and the ordering of the stepscan be changed.

At block 301, the electronic device 1 can send a request signal to theserver 2 for requesting the server 2 to establish a transmitting channelbetween the electronic device 1 and the remote device 3. The electronicdevice 1 can send the request signal to the server 2 through thecommunication device 80.

In at least one exemplary embodiment, the electronic device 1 can sendthe request signal in response to a first control signal generated bythe controller 70.

For example, when the input device 60 is the touch display, the touchdisplay can generate a first touch signal in response to a user touch ona first predetermined object (e.g., a live streaming play icon)displayed on the touch display. The controller 70 can generate the firstcontrol signal in response to the first touch signal.

At block 302, the electronic device 1 can determine whether thecommunication device 80 receives a feedback signal from the server 2.The feedback signal indicates that the server 2 has established thetransmitting channel. The feedback signal can include informationassociated with the transmitting channel. For example, the informationcan be a network address of the transmitting channel. When communicationdevice 80 receives the feedback signal, the process goes to blocks 3031and 3041. When the communication device 80 does not receive the feedbacksignal, the process returns to block 301.

At block 3031, when the communication device 80 receives the feedbacksignal, the microphone 30 collects a voice signal.

At block 3032, the audio codec 130 encodes the voice signal to generatedigital audio data. The audio codec 130 transmits the digital audio datato the mixer 140.

In at least one exemplary embodiment, when the audio codec 130 encodesthe voice signal, the audio codec 130 can insert collecting time ofcollecting the voice signal into the digital audio data, such that thedigital audio data includes the collecting time.

At block 3041, when the communication device 80 receives the feedbacksignal, the obtaining module 1101 can control the first camera 40 tocapture first still images and can control the second camera 50 tocapture second still images.

For example, as shown in FIG. 4A, the first camera 40 captures thirtystill images (e.g., “A1”, “A2”, “A3” . . . “A30”) within a first secondand the second camera 50 captures thirty still images (e.g., “B1”, “B2”,“B3” . . . “B30”) within the first second. The first still image “A1”and the second still image “B1” are captured at the same time. The firststill image “A2” and the second still image “B2” are captured at thesame time. The first still image “A3” and the second still image “B3”are captured at the same time, and so on. Accordingly, the first stillimage “A30” and the second still image “B30” are captured at the sametime. In at least one exemplary embodiment, the quantity of pixels ofthe first camera 40 is greater than the quantity of pixels of the secondcamera 50, and a first width “W1” of each first still image is greaterthan a second width “W2” of each second still image.

At block 3042, the cropping module 1102 can crop the first still imagesand/or the second still images according to a predetermined croppingmethod, so that each first still image and each second still imagecaptured at the same time can be combined according to a predeterminedcombining method.

In at least one exemplary embodiment, the predetermined cropping methodcan be one of the following three cropping methods.

A first cropping method includes cropping the first still images and/orthe second still images, so that the first width “W1” of each firststill image equals the second width “W2” of each second still image.

For a first example, when the first width “W1” of each first still imageis greater than the second width “W2” of each second still image, thecropping module 1102 can reduce the overall size of the first stillimage based on a central point of the first still image, so that thefirst width “W1” of the first still image is equal to the second width“W2” of the second still image.

For example, as shown in FIG. 4A, the cropping module 1102 can reducethe size of each of the thirty still images “A1”, “A2”, “A3” . . . “A30”based on the central point of each of the thirty images “A1”, “A2”, “A3”. . . “A30”, so that the first width “W1” of each of the thirty stillimages “A1”, “A2”, “A3” . . . “A30” is equal to the second width “W2” ofeach of the thirty still images “B1”, “B2”, “B3” . . . “B30” as shown inFIG. 4B.

For a second example, as shown in FIG. 4A, when the first width “W1” ofeach first still image is greater than the second width “W2” of eachsecond still image, the cropping module 1102 can enlarge the secondstill image based on a central point of the second still image, so thatthe second width “W2” of the second still image is equal to the firstwidth “W1” of the first still image.

For a third example, as shown in FIG. 4A, when the first width “W1” ofeach first still image is greater than the second width “W2” of eachsecond still image, the cropping module 1102 can directly crop a leftside and a right side of the first still image, so that the first width“W1” of the first still image is equal to the second width “W2” of thesecond still image.

A second cropping method includes cropping the first still images and/orthe second still images, so that a first height of each first stillimage is equal to a second height of each second still image.

For a first example, when the first height of each first still image isgreater than the second height of each second still image, the croppingmodule 1102 can reduce the first still image based on the central pointof the first still image, so that the first height of the first stillimage is equal to the second height of the second still image.

For a second example, when the first height of each first still image isgreater than the second height of each second still image, the croppingmodule 1102 can enlarge the second still image based on the centralpoint of the second still image, so that the second height of the secondstill image is equal to the first height of the first still image.

For a third example, when the first height of each first still image isgreater than the second height of each second still image, the croppingmodule 1102 can directly crop a top side and a bottom side of the firststill image, so that the first height of the first still image is equalto the second height of the second still image.

A third cropping method includes cropping the first still images and/orthe second still images, so that the first width of each first stillimage is equal to the second width of each second still image, and sothat the first height of each first still image is equal to the secondheight of each second still image.

For example, when the first width of each first still image is greaterthan the second width of each second still image, and the first heightof each first still image is greater than the second height of eachsecond still image, the cropping module 1102 can crop the left side andthe right side of the first still image, so that the first width of thefirst still image is equal to the second width of the second stillimage. The cropping module 1102 can also crop the top side and thebottom side of the first still image, so that the first height of thefirst still image is equal to the second height of the second stillimage.

In at least one exemplary embodiment, when the first cropping method isadopted by the cropping module 1102, a first combining method can beadopted to combine each first still image and each second still imagecaptured at the same time. The first combining method indicates thateach first still image and each second still image are combined in avertical direction.

In at least one exemplary embodiment, when the second cropping method isadopted by the cropping module 1102, a second combining method can beadopted to combine each first still image and each second still imagecaptured at the same time. The second combining method indicates thateach first still image and each second still image are combined in ahorizontal direction.

In at least one exemplary embodiment, when the third cropping method isadopted by the cropping module 1102, the first or the second combiningmethod can be adopted to combine each first still image and each secondstill image captured at the same time. In other words, each first stillimage and each second still image can be combined in the verticaldirection or the horizontal direction.

At block 3043, the combining module 1103 can combine the first stillimages and the second still images according to the correspondingcombining method to generate combined images. The combining module 1103can send the combined images to the video codec 120.

In at least one exemplary embodiment, the combining module 1103 cancombine each first still image and each second still image captured atthe same time, to generate a combined image.

For example, when the first cropping method is adopted by the croppingmodule 1102, the combining module 1103 can combine the first still imageand the second still image in the vertical direction. As shown in FIG.4C, the combining module 1103 can combine the first still image “A1” andthe second still image “B1”, which are captured at the same time, in thevertical direction to generate a first combined image “A1B1”. Thecombining module 1103 can combine the first still image “A2” and thesecond still image “B2”, which are captured at the same time, in thevertical direction to generate a second combined image “A2B2”. Thecombining module 1103 can combine the first still image “A3” and thesecond still image “B3”, which are captured at the same time, in thevertical direction to generate a third combined image “A3B3”. Similarly,the combining module 1103 can combine the first still image “A30” andthe second still image “B30”, which are captured at the same time, inthe vertical direction to generate a combined image “A30B30”.

At block 3044, the video codec 120 can encode the combined images intoencoded images with a predetermined format (e.g., MPEG4 format), andthen transmit the encoded images to the mixer 140.

For example, the video codec 120 can encode the thirty combined images“A1B1”, “A2B2”, “A3B3” . . . “A30B30” into images of MPEG4 format, andthen transmit the thirty images of MPEG4 format to the mixer 40.

At block 305, the mixer 40 can mix the encoded images with the digitalaudio data to generate a streaming video.

In at least one exemplary embodiment, the mixer 140 can, based on timeof capturing the first and second still images and time of collectingthe digital audio data, mix the encoded images with the digital audiodata to generate a streaming video. In other words, each encoded imageincludes one of the first still images and one of the second stillimages which are combined and captured at the same time; and the mixer140 can mix the first and second still images of the encoded images andthe digital audio data, which are captured and collected respectively atthe same time, so as to generate the streaming video.

For example, the mixer 140 can mix the thirty images of MPEG4 formatwith the digital audio data that is collected in the first second togenerate a streaming video. As mentioned above, the time of capturingthe thirty images of MPEG4 format is within the first second.

In at least one exemplary embodiment, the mixer 140 can store thestreaming video in the storage device 20 when it receives a secondcontrol signal generated by the controller 70.

For example, when the input device 60 is a touch display, the touchdisplay can generate a second touch signal in response to a touch on asecond predetermined object (e.g., an icon) displayed on the touchdisplay, and the controller 70 can generate the second control signal inresponse to the second touch signal.

At block 306, the mixer 140 can further transmit the streaming video tothe communication device 80.

At block 307, the communication device 80 can transmit the streamingvideo to the remote device 3 through the transmitting channelestablished between the electronic device 1 and the remote device 3 bythe server 2, such that the electronic device 1 shares the streamingvideo with the remote device 3.

In at least one exemplary embodiment, the image processing module 110can change the combining method for combing each first still image andeach second still image when a third control signal generated by thecontroller 70 is received.

For example, as shown in FIG. 4C, when the input device 60 is the touchdisplay, the touch display can generate a third touch signal in responseto a user touch on the first combined image “A1B1” displayed on thetouch display. The controller 70 can generate the third control signalin responses to the third touch signal. In response to the third controlsignal, the combining module 1103 of the image processing module 110 canthen switch positions of the first still image and the second stillimage in each of the combined images “A1B1”, “A2B2”, “A3B3” . . .“A30B30” as shown in FIG. 5.

It should be emphasized that the above-described embodiments of thepresent disclosure, including any particular embodiments, are merelypossible examples of implementations, set forth for a clearunderstanding of the principles of the disclosure. Many variations andmodifications can be made to the above-described embodiment(s) of thedisclosure without departing substantially from the spirit andprinciples of the disclosure. All such modifications and variations areintended to be included herein within the scope of this disclosure andprotected by the following claims.

What is claimed is:
 1. An electronic device comprising: a first camerafor capturing first still images; a second camera for capturing secondstill images; a microphone for collecting a voice signal; an audio codecfor encoding the voice signal to generate digital audio data; an imageprocessing module comprising: an obtaining module for controlling thefirst camera to capture the first still images and controlling thesecond camera to capture the second still images; a cropping module foradjusting a first width of each of the first still images to be equal toa second width of each of the second still images; or adjusting a firstheight of each of the first still images to be equal to a second heightof each of the second still images; and a combining module forgenerating combined images by combining the first still images and thesecond still images in a vertical direction when the first width of eachof the first still images equals the second width of each of the secondstill images; or generating combined images by combining the first stillimages and the second still images in a horizontal direction when thefirst height of each of the first still images equals the second heightof each of the second still images; a video codec for encoding thecombined images to generate encoded images with a predetermined format;a mixer for mixing the encoded images with the digital audio data togenerate a streaming video; and a communication device for transmittingthe streaming video to a remote device.
 2. The electronic deviceaccording to claim 1, further comprising a processor and a storagedevice, wherein the obtaining module, the cropping module and thecombining module are implemented as software modules, stored in thestorage device and executed by the processor.
 3. The electronic deviceaccording to claim 1, wherein the communication device sends a server arequest signal for requesting the server to establish a transmittingchannel between the electronic device and the remote device; and whereinthe communication device transmits the streaming video to the remotedevice via the transmitting channel.
 4. The electronic device accordingto claim 1, wherein the audio codec inserts time of collecting the voicesignal into the digital audio data; wherein each encoded image includesone of the first still images and one of the second still images whichare combined and captured at the same time; and wherein the first andsecond still images of the encoded images and the digital audio datamixed by the mixer are captured and collected respectively at the sametime.
 5. The electronic device according to claim 1, wherein theadjusting of the first width of each of the first still images to beequal to the second width of each of the second still images comprises:reducing an overall size of each first still image based on a centralpoint of each first still image, or enlarging each second still imagebased on a central point of each second still image, when the firstwidth of each first still image is greater than the second width of eachsecond still image.
 6. The electronic device according to claim 1,wherein a quantity of pixels of the first camera is greater than aquantity of pixels of the second camera.
 7. The electronic deviceaccording to claim 1, further comprising: an input device for generatingan input signal in response to an user input; and a controller forgenerating a control signal in response to the input signal, wherein thecombining module switches positions of the first still image and thesecond still image in each of the combined images in response to thecontrol signal.
 8. A method of sharing a streaming video applied to anelectronic device, which comprises a first camera and a second camera,the method comprising: collecting a voice signal; encoding the voicesignal to generate digital audio data; controlling the first camera tocapture first still images and controlling the second camera to capturesecond still images; adjusting a first width of each of the first stillimages to be equal to a second width of each of the second still images;or adjusting a first height of each of the first still images to beequal to a second height of each of the second still images; andgenerating combined images by combining the first still images and thesecond still images in a vertical direction when the first width of eachof the first still images equals the second width of each of the secondstill images; or generating combined images by combining the first stillimages and the second still images in a horizontal direction when thefirst height of each of the first still images equals the second heightof each of the second still images; encoding the combined images togenerate encoded images with a predetermined format; mixing the encodedimages with the digital audio data to generate a streaming video; andtransmitting the streaming video to a remote device.
 9. The methodaccording to claim 8, further comprising: sending a server a requestsignal for requesting the server to establish a transmitting channelbetween the electronic device and the remote device; and transmittingthe streaming video to the remote device via the transmitting channel.10. The method according to claim 8, further comprising: inserting timeof collecting the voice signal into the digital audio data, wherein eachencoded image includes one of the first still images and one of thesecond still images which are combined and captured at the same time;and wherein the mixing step further comprises mixing the first andsecond still images of the encoded images and the digital audio data,which are captured and collected respectively at the same time.
 11. Themethod according to claim 8, wherein the adjusting of the first width ofeach of the first still images to be equal to the second width of eachof the second still images comprises: reducing an overall size of eachfirst still image based on a central point of each first still image, orenlarging each second still image based on a central point of eachsecond still image, when the first width of each first still image isgreater than the second width of each second still image.
 12. The methodaccording to claim 8, wherein a quantity of pixels of the first camerais greater than a quantity of pixels of the second camera.
 13. Themethod according to claim 8, further comprising: generating an inputsignal in response to an user input; generating a control signal inresponse to the input signal; and switching positions of the first stillimage and the second still image in each of the combined images inresponse to the control signal.